package edu.bu.grocerylist.dao;

import java.util.List;

import edu.bu.grocerylist.model.GroceryList;
import edu.bu.grocerylist.model.GroceryUser;

public interface IGroceryListDao {

	/**
	 * Saves a GroceryList object to the database
	 * @param list
	 */
	public abstract GroceryList saveGroceryList(GroceryList list);

	/**
	 * Deletes a GroceryList object from the database
	 * @param list
	 */
	public abstract boolean deleteGroceryList(GroceryList list);
	
	/**
	 * Deletes all grocery lists of a particular user
	 * @param user The user who's lists we are deleting
	 */
	public abstract void deleteGroceryListsOfUser(GroceryUser user);

	/**
	 * Retrieves all of a user's groceryLists
	 * @param userEmail The user's ID from the database
	 * @return
	 */
	public abstract List<GroceryList> getGroceryListsByUser(int userId);

	/**
	 * Retrieves a single GroceryList object from the database by an id
	 * @param id The unique id to identify the grocery list
	 * @return The found grocery list
	 */
	public abstract GroceryList getGroceryListById(int id);

}